<H1>{{constituency.name}}</H1>
<ul>
{% for party, leaflets in party_list %}
  <li>
    {{ party.name }}
    {% for leaflet in leaflets %}
        <a href="/leaflets/{{leaflet.leaflet_id}}" onMouseOver="document.getElementById('thumb').innerHTML = '<a href=\'/leaflets/{{leaflet.leaflet_id}}\'><img src=\'http://thestraightchoice.s3.amazonaws.com/thumbnail/{{leaflet.leafletimage_set.all.0.image_key}}.jpg\'></a>';">{{forloop.counter}}</a>
    {% endfor %}
  </li>
{% endfor %}
</ul>
<div id="thumb"><h1>Hover over a number for a leaflet preview.</h1></div>
